<div class="apply-ware">
    
    <div nz-row nzGutter="5" class="row_1">
        <div nz-col nzSpan="5">
            <label style="width: 10%;">申请编码：</label>
            <input nz-input placeholder="输入申请编码" [(ngModel)]="ApplyCode" appHotSearch
                (hotSearchEmit)="GetSearchPageList()" style="width: 68%;" />
        </div>
        <div nz-col nzSpan="5">
            <label style="width: 10%;">申请编码：</label>
            <input nz-input placeholder="输入申请人" [(ngModel)]="ApplyUser" appHotSearch
                (hotSearchEmit)="GetSearchPageList()" style="width: 68%;" />
        </div>
        <div nz-col nzSpan="4">
            <label style="width: 10%;">审批状态：</label>
            <nz-select nzDropdownClassName="select_custom" class="select_term" style="width: 60%;"
                [(ngModel)]="ExState" (ngModelChange)="selectedExState($event)">
                <nz-option nzValue="" nzLabel="请选择"></nz-option>
                <nz-option *ngFor="let item of wareInStateList" [nzValue]="item.key" [nzLabel]="item.value">
                </nz-option>
            </nz-select>
        </div>
        <div nz-col nzSpan="5">
            <label style="width: 10%;">单据类别：</label>
            <nz-select nzDropdownClassName="select_custom" style="width: 68%;" nz-col [(ngModel)]="searchType"
                [nzSize]="100" nzPlaceHolder="单据类别" (ngModelChange)="selectedType($event)">
                <nz-option nzValue="" nzLabel="请选择"></nz-option>
                <nz-option nzValue="1" nzLabel="入库单"></nz-option>
                <nz-option nzValue="2" nzLabel="出库单"></nz-option>
            </nz-select>
        </div>
        <div nz-col nzSpan="5">
            <label style="width: 10%;">单据类型：</label>
            <nz-select nzDropdownClassName="select_custom" style="width: 68%;" class="select_term"
                [(ngModel)]="DocumentType" (ngModelChange)="selectedDocumentType($event)">
                <nz-option nzValue="" nzLabel="请选择"></nz-option>
                <nz-option *ngFor="let item of MaterialInBillTypeEnum" [nzValue]="item.key" [nzLabel]="item.value">
                </nz-option>
            </nz-select>
        </div>
    </div>
    <div nz-row nzGutter="5" class="row_2">
        <div nz-col nzSpan="24" class="operate_btn">
            <a routerLink="/material/warehouse/applywarewarehousing" class="ant-btn ant-btn-primary first-child"
                ><i nz-icon nzType="plus"></i>创建入库单</a>
            <a routerLink="/material/warehouse/applywareoutofstock" class="ant-btn first-child"><i
                    nz-icon nzType="plus"></i>创建出库单</a>
            <button nz-button nzType="" [disabled]="editDisabled" (click)="Edit()"
                [class]="editDisabled?'ant-btn ant-btn-primary two disabledBg':'ant-btn ant-btn-primary two'"
                >
                <i nz-icon nzType="edit"></i>修改</button>
            <button nz-button nzType="" [disabled]="deleteDisabled" (click)="Del()"
                [class]="deleteDisabled?'ant-btn ant-btn-primary disabledBg':'ant-btn ant-btn-primary'"
                ><i nz-icon nzType="delete"></i>删除</button>
            <button nz-button nzType="" [disabled]="infoDisabled" (click)="info()"
                [class]="infoDisabled?'ant-btn ant-btn-primary disabledBg':'ant-btn ant-btn-primary'"
                ><i nz-icon nzType="download"></i>明细</button>
        </div>
    </div>
    <div nz-row class="row_2">
        <!-- <div nz-row class="operate_btn">
            <a routerLink="/material/warehouse/applywarewarehousing" class="ant-btn ant-btn-primary first-child"><i nz-icon nzType="plus"></i>创建入库单</a>
            <a routerLink="/material/warehouse/applywareoutofstock" class="ant-btn first-child"><i nz-icon nzType="plus"></i>创建出库单</a>
            <button nz-button nzType="" [disabled]="editDisabled" (click)="Edit()"
            [class]="editDisabled?'ant-btn ant-btn-primary two disabledBg':'ant-btn ant-btn-primary two'">
                <i nz-icon nzType="edit"></i>修改</button>
            <button nz-button nzType="" [disabled]="deleteDisabled" (click)="Del()"
                [class]="deleteDisabled?'ant-btn ant-btn-primary disabledBg':'ant-btn ant-btn-primary'"><i nz-icon
                    nzType="delete"></i>删除</button>
            <button nz-button nzType="" [disabled]="infoDisabled" (click)="info()" 
            [class]="infoDisabled?'ant-btn ant-btn-primary disabledBg':'ant-btn ant-btn-primary'"><i nz-icon nzType="download"></i>明细</button>
        </div> -->
        <nz-table #expandTable [nzData]="listData" [nzFrontPagination]="false" [nzBordered]="true" nzSize="small">
            <thead>
                <tr>
                    <th nzShowCheckbox [(nzChecked)]="isAllChecked" [nzIndeterminate]="isIndeterminate"
                        (nzCheckedChange)="checkAll($event)"></th>
                    <th>序号</th>
                    <th>申请编码
                    </th>
                    <th>单据类别</th>
                    <th>单据类型</th>
                    <th>申请时间
                    </th>
                    <th>申请人
                    </th>
                    <th>最后审批时间
                    </th>
                    <th>最后审批人
                    </th>
                    <th>审批状态
                    </th>
                    <th>备注
                    </th>
                    <!-- <th>操作
                    </th> -->
                </tr>
            </thead>
            <tbody>
                <tr *ngFor="let data of expandTable.data;let i = index;"
                    class="tbodyData ant-table-row ng-star-inserted">
                    <td nzShowCheckbox [(nzChecked)]="data.checked" [nzDisabled]="data.disabled"
                        (nzCheckedChange)="SelectRow()">
                    </td>
                    <td style="display: none;">{{ data.id }}</td>
                    <td>{{ i+1 }}</td>
                    <td>{{ data.code }}</td>
                    <td>{{ data.typeStr }}</td>
                    <td>{{ data.billTypeStr }}</td>
                    <td>{{ data.reqDate }}</td>
                    <td>{{ data.createByName }}</td>
                    <td>{{ data.lastApprovalDate }}</td>
                    <td>{{ data.lastApproverName }}</td>
                    <td>{{ data.statusTypeStr}}</td>
                    <td>{{ data.remarks }}</td>
                </tr>
            </tbody>
        </nz-table>
        <div nz-row class="row_4" *ngIf="expandTable.data.length!=0">
            <nz-pagination (nzPageIndexChange)="clickPage($event)" (nzPageSizeChange)="clickSize($event)"
                [(nzPageIndex)]="pageIndex" [nzTotal]="totalSize" [nzShowTotal]="totalTemplate"></nz-pagination>
            <ng-template #totalTemplate let-total> 总共 {{totalSize}} 条 </ng-template>
        </div>
    </div>
</div>